package com.qd.common.panda.domain.entity.space;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 租赁日期列表
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class ParkSpaceDateDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "日期ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "日期ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String did;
    /**
     * 租赁时间
     */
    private LocalDateTime leaseTime;
    /**
     * 租赁ID
     */
    @Size(max = 50, message = "租赁ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String sid;
    /**
     * 租赁人
     */
    @Size(max = 50, message = "租赁人长度不能超过{max}位", groups = DefaultGroup.class)
    private String tenant;
    /**
     * 租赁人车牌号
     */
    private String tenantNumber;

    @Override
    public void freeData() {
        this.did = null;
        this.leaseTime = null;
        this.sid = null;
        this.tenant = null;
        this.tenantNumber = null;
        super.freeData();
    }
}
